package top.lshaci.learning.framework.swagger.controller;

import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import top.lshaci.learning.framework.swagger.service.Swagger2DocService;

import javax.servlet.http.HttpServletResponse;

/**
 * Swagger2DocController
 *
 * @author lshaci
 * @since 1.0.0
 */
@RestController
@AllArgsConstructor
@RequestMapping("/swagger")
public class Swagger2DocController {

    private final Swagger2DocService swagger2DocService;

    @GetMapping("/doc")
    public void generator(String url, HttpServletResponse response) {
        swagger2DocService.generator(url, response);
    }
}
